<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!--<script>-->
			<!--function validate_required(field, alerttxt) {-->
				<!--with (field) {-->
					<!--if (value == null || value == "") {-->
						<!--alert(alerttxt);-->
						<!--return false-->
					<!--} else {-->
						<!--return true-->
					<!--}-->
				<!--}-->
			<!--}-->

			<!--function validate_email(field, alerttxt) {-->
				<!--with (field) {-->

					<!--apos = value.indexOf("@")-->
					<!--dotpos = value.lastIndexOf(".")-->
					<!--if (apos < 1 || dotpos - apos < 2) {-->
						<!--alert(alerttxt);-->
						<!--return false-->
					<!--}-->
					<!--else {-->
						<!--return true-->
					<!--}-->
				<!--}-->
			<!--}-->

			<!--function validate_form(thisform) {-->
				<!--with (thisform) {-->
					<!--alert(thisform.email.value);-->

					<!--if (validate_required(email, "Email must be filled out!") == false) {-->
						<!--email.focus();-->
						<!--return false-->
					<!--}-->
					<!--if (validate_email(email, "Email must be legal") == false) {-->
						<!--return false-->
					<!--}-->
				<!--}-->
			<!--}-->

			<!--function onClick() {-->

<!--//				document.getElementById("p").innerHTML = "0-=-=-=-="-->
				<!--var es = document.getElementsByTagName("p")-->

				<!--for (e in es) {-->

					<!--alert(e)-->
					<!--e.innerHTML = "1-=-=-=-="-->
				<!--}-->


<!--//              var tag = document.getElementsByTagName("")-->
<!--//              document.getElementsByClassName(p).innerHTML('____')-->
			<!--}-->

<!--//			person = new Object()-->
<!--//			person.firstName = "Bill"-->
<!--//			person.lastName = "Gates"-->
<!--//			person.age = 56-->
<!--//			person.eyeColor = "blue"-->
<!--//-->
<!--//-->
<!--//        person = {firstName: "Bill", lastName: "Gates", age: 56, eyeColor: "blue"}-->
<!--//        person = {"fistName": "Bill"}-->
<!--//-->
<!--//        alert("werwe" + person.fistName)-->


<!--//						var patt1=new RegExp("e");-->
<!--//-->
<!--//						document.write(patt1.exec("The best things in life are free"));-->
<!--//-->
<!--//						var patt1=new RegExp("e","g");-->
<!--//						do-->
<!--//						{-->
<!--//							result=patt1.exec("The best things in life are free");-->
<!--//							document.write(result);-->
<!--//						}-->
<!--//						while (result!=null)-->


						<!--var patt1=new RegExp("e");-->

						<!--document.write(patt1.test("The best things in life are free"));-->

						<!--patt1.compile("d");-->

						<!--document.write(patt1.test("The best things in life are free"));-->

    <!--</script>-->
</head>
<body>

<!--onsubmit="return validate_form(this)"-->
<form action="submitpage.htm" onclick="onClick()"
      method="post">
    Email: <input type="text" name="email" size="30">

    <p id="p">
        pppp
    </p>

    <label for="feeling">Feeling:</label>
    <input id="feeling" type="text" oninput="validateFeeling(this)">


    <input type="submit" value="Submit">
</form>

<script>
	function validateFeeling(input) {
		if (input.value == "good" || input.value == "fine" || input.value == "tired") {
			input.setCustomValidity('"' + input.value + '" is not a feeling');
		} else {
			// The data is valid, reset the error message.
			input.setCustomValidity('');
		}
	}
</script>


<div id="example"></div>

<script>

	txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
	txt+= "<p>Browser Name: " + navigator.appName + "</p>";
	txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";
	txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
	txt+= "<p>Platform: " + navigator.platform + "</p>";
	txt+= "<p>User-agent header: " + navigator.userAgent + "</p>";
	txt+= "<p>User-agent language: " + navigator.systemLanguage + "</p>";

	document.getElementById("example").innerHTML=txt;

</script>

</body>
</html>